﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LabaStr
{
    class Program
    {
        static void Main(string[] args)
        { 
            int[] i  = {2,1,4,6,7,3,2,23,4,2,1,7};

            int[] res = GetUnique(i);
            PrintArray(res);
            Console.ReadLine();
        }
        public static int[] GetUnique(int[] mas) // Distinct
        {
            int[] res = new int[mas.Length];
            int resIndex = 0;

            for (int i = 0; i < mas.Length; i++)
            {
                bool isUsing = true;
                for(int j = 0; j < mas.Length; j++)
                {
                    if (i == j)
                        continue;
                    if(mas[i]==mas[j])
                    {
                        isUsing = false;
                        break;
                    }
 
                }
                if (isUsing)
                {
                    res[resIndex++] = mas[i];
                }
            }
            return res;
        }
        public static void PrintArray(int[] input)
        {
            for (int j = 0; j < input.Length; j++)
                Console.Write(" {0}", input[j]);
        }


    }
}
